package com.azier.kapacitor.script.method;

import com.azier.kapacitor.script.arg.OriginalArg;

import java.util.ArrayList;

/**
* 1 * @Author: luoj
* 2 * @Date: 2019/11/8 11:27
* 3
*/
public class Tolerance extends AbstractMethod {
    private static final String name = "tolerance";
    /**
    The maximum duration of time that two incoming points can be apart and still be considered to be equal in time. The joined data point’s time will be rounded to the nearest multiple of the tolerance duration.
    **/
    /**
    两个进入点可以分开并且仍然被认为在时间上相等的最大持续时间。加入的数据点的时间将四舍五入到公差持续时间的最接近倍数。
    **/
    public Tolerance(long interval, String durationLiteral) {
        super(new ArrayList<>(), name);
        //
        this.args.add(new OriginalArg(interval + durationLiteral));

    }
}
